home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Precision Software Appli…tions Silver Collection 1
/
Precision Software Applications Silver Collection Volume One (PSM) (1993).iso
/
tutor
/
tw30.arj
/
TWTUT6.CHP
< prev
next >
Wrap
Text File
|
1992-11-28
|
8KB
|
340 lines
%
#EF
#TGETTING FANCY
#C2,R6
In this ~HChapter~N we'll look at some of the more complex ~H~bTutorialWriter~N
Commands. These are the ones that let you do some really fancy stuff
in your ~M~Itutorial~N.
Here's what we'll cover :
~H#BO,x1,y1,x2,y1,Boxtype,Grow,Center,Lines,Fore,Back~N An Overlay Box
~H#BN,x1,y1,x2,y1,Boxtype,Grow,Center,Lines,Fore,Back~N A Normal Box
~H#SK~N Screen Saving
~H#SS,Direction,x1,y1,x2,y2,n~N Screen Scrolling
~H%~N Paging Back
And we'll start with the most complex of all, the ~HBox Commands~N.
#W
%
#EF
#T
#C2,R5
The box ~HCommands~N are the most complex of all ~H~bTutorialWriter~H Commands~N. There
are two types of boxes - an ~HOverlay~N box which disappears after 60 seconds
or when a key is pressed, leaving the underlying text intact and a ~HNormal~N
box which stays on screen until the screen is cleared. Here is the full ~HCommand~N
for an ~HOverlay~N box :. ~H#BO,25,16,70,22,7,1,1,5,14,4~N
#W
#EL,25
#BO,40,17,80,20,0,1,0,2,1,3
We start with the Command for
an Overlay Box.
#C2,R16
~G~I#BO
#W
#BO,40,16,80,21,0,1,0,4,1,3
Now we need to position the box
on the screen. The first number
gives the first Column and the
second number, the top Row.
#C5,R16
~H~F,25,16~N
#BO,40,16,80,20,0,1,0,3,1,3
It starts at Column 25 in Row 16.
The next two numbers give the
last Column and bottom Row.
#C5,R16
~G~I,25,16~H~F,70,22~N
#BO,40,16,80,22,0,1,0,5,1,3
The next number is the box type.
The Quick Reference print-out
or the Help system shows the codes
available. 7 is a double border
box with a dropped shadow.
#C5,R16
~G~I,25,16,70,22~H,7~N
#BO,40,16,80,20,0,1,0,3,1,3
The box will appear fully drawn
if the next number is 0, or will
''explode'' if it is 1.
#C5,R16
~G~I,25,16,70,22,7~H,1~N
#BO,40,16,80,20,0,1,0,3,1,3
The next number says Center
the Text if it is 1, or don't
if it is 0.
#C5,R16
~G~I,25,16,70,22,7,1~H,1~N
#BO,40,16,80,19,0,1,0,2,1,3
Now a number to tell how many lines
of text to read into the box.
#C5,R16
~G~I,25,16,70,22,7,1,1~H,5~N
#BO,40,16,80,20,0,1,0,3,1,3
And finally two numbers to define the
Text and the Background colors - Text
color first.
#C5,R16
~G~I,25,16,70,22,7,1,1,5~H,14,4~N
#BO,40,16,80,19,0,1,0,2,1,3
Now put the five lines of text
immediately after the command.
#C5,R16
~G~I,25,16,70,22,7,1,1,5,14,4~N
#C1,R17
Overlay box, col 25 row 16 to
col 70 row 22, doubleborder/dropshadow,
exploding, - center 5 lines of
text written in yellow on red.
Does not erase underlying text.
#W
#BO,25,16,70,22,7,1,1,5,14,4
Overlay box, col 25 row 16 to
col 70 row 22, doubleborder/dropshadow,
exploding, - center 5 lines of
text written in yellow on red.
Does not erase underlying text.
#EL,25
#WP
%
#EF
#T
#C2,R5
The good news is that the ~HCommand~N for a ~HNormal~N box is almost identical
to that for an ~HOverlay~N box. Change ~C~I#BO~N to ~C~I#BN~N and it is a ~HNormal~N box.
The only other change to be made is the number for the ~C~IBoxtype~N. ~HNormal~N
boxes do not have dropped shadows, so there is a different set of ~C~IBoxtype~N
codes. They are explained in the ~HQuick Reference~N print-out and the ~c~ZHelp~N
system within the ~H~bTutorialWriter~H Editor~N.
~H#BN,25,16,70,22,2,0,0,5,0,3
Normal box, col 25 row 16 to
col 70 67 row 22, doubleborder
and not exploding, - no centering.
5 lines of text black on cyan.
Does not disappear after a delay.
#W
#BN,25,16,70,22,2,0,0,5,0,3
Normal box, col 25 row 16 to
col 70 67 row 22, doubleborder
and not exploding, - no centering.
5 lines of text black on cyan.
Does not disappear after a delay.
#EL,25
#WP
#B
#SK
%
#EF
#T
#C2,R5
Now we'll take a look at the ~HScreen Saving Commands~N.
The ~HCommand~N which saves a complete screen is ~C~I#SK,S,n~N ( ~C~In~N is the number used
to identify that screen ). Theoretically, up to 10 separate screens can
be saved, but since each one requires ~H5000 bytes of memory~N , the number
that you will be able to save will depend on the amount of memory available
in the computer on which your ~M~ITutorials~N will be run.
When a screen has been saved, it remains in computer memory until it is
disposed of by using the ~HCommand~C~I #SK,D,n~N.
#WP
%
#EF
#T
#C2,R5
The ~HCommand~N to restore a saved screen is ~C~I#SK,R,Direction,n~N. The values
for ~C~IDirection~N are ~C~IU~N for Up, ~C~ID~N for Down, ~C~IL~N for Left and ~C~IR~N for Right.
When these values are used, the ~HScreen ~C~In~H will be restored by sliding towards
the ~C~IDirection~H specified~N. To restore a screen without sliding, the value ~C~IN~N
( for i~C~IN~Nstantly ) is used for ~C~IDirection~N.
I'll create a screen with ~C~I#HF~N and save it ~C~I#SK,S,1~N. Then I'll restore it with
each of the ~C~IDirection~N values :
#SK,S,2
#WN
#HF,1,4,80,24,5,0,7
#D2
#SK,S,1
#SK,R,N,2
#C2,R20
~K~H#SK,R,L,1~N~k
#EL,25
#WN
#SK,S,2
#SK,R,L,1
#EL,25
#WN
#SK,R,N,2
#C2,R21
~K~H#SK,R,R,1~k~N
#SK,D,2
#SK,S,2
#EL,25
#WN
#SK,R,R,1
#EL,25
#WN
#SK,R,N,2
#C2,R22
~K~H#SK,R,D,1~k~N
#SK,D,2
#SK,S,2
#EL,25
#WN
#SK,R,D,1
#EL,25
#WN
#SK,R,N,2
#C2,R23
~K~H#SK,R,U,1~k~N
#SK,D,2
#SK,S,2
#EL,25
#WN
#SK,R,U,1
#EL,25
#WN
#SK,R,N,2
#C2,R24
~K~H#SK,R,N,1~k~N
#SK,D,2
#SK,S,2
#EL,25
#WN
#SK,R,N,1
#EL,25
#WN
#SK,R,D,2
#SK,D,2
#SK,D,1
#EL,25
#WP
%
#EF
#T
#C2,R5
~H#SS,Direction,x1,y1,x2,y2,n~N Screen Scrolling
The ~HCommand~N to scroll the screen is ~C~I#SS,Direction,x1,y1,x2,y2,n~N. ~C~IDirection~N
has four possible values - ~C~IU~N, ~C~ID~N, ~C~IL~N, ~C~IR~N. The section of the screen to be
scrolled is defined by ~C~Ix1,y1,x2,y2~N. And ~C~In~N tells how many rows ( if ~C~IU~N or ~C~ID~N )
or columns ( if ~C~IL~N or ~C~IR~N ) the section is to be scrolled.
Using this screen as an example, we'll scroll the second line (line ~H7~N) to the
~C~IR~Night, from the word 'scroll' (Col ~H17~N) to the end of the word 'screen' (Col ~H34~N)
by ~H7~N columns :
~H#SS,R,17,7,34,7,7~N
#SK,S,1
#W
#SS,R,17,7,34,7,7
#W
#SK,R,N,1
#C2,R23
~KNow do it to the left for lines 7 to 9!!
~H#SS,L,17,7,34,9,7~N~k
#SK,S,1
#W
#SS,L,17,7,34,9,7
#W
#SK,R,N,1
#W
#C45,R19
~KScroll lines 7 to 11 down two rows.
~H#SS,D,17,7,34,11,2~N~k
#SK,S,1
#W
#SS,D,17,7,34,11,2
#W
#SK,R,N,1
#W
#C45,R22
~KScroll lines 7 to 11 up two rows.
~H#SS,U,17,7,34,11,2~N~k
#SK,S,1
#W
#SS,U,17,7,34,11,2
#EL,25
#SK,D,1
#WP
%
#EF
#T
#C2,R6
Now let's look at ~HPaging Back~N in a ~M~Itutorial~N.
To use ~w~Z PAGEBACK ~N you must mark the 'pages' in your ~HCHAPTER~N by placing a ~C~I%~N
in the first position in a Row. It should be used between ~C~I#W~N which halts
the display, and ~C~I#EF~N which clears the screen. Then it will be invisible to
the reader.
The arithmetic of ~HPaging Back~N is simple. ~G~ITWTEACH~N counts the number of ~C~I%~N signs
it has read. When you ~Z~w PAGEBACK ~N, it deducts one from this number, and goes to
that ~HMarker~N. This means there must always be at least two ~C~I%~N signs used. So to
activate the ~HPage Marker~N on an ~G~Iearlier screen~N, the screen you are viewing must
also have a ~HMarker~N. This is important on the ~HLAST~N screen of your ~M~Itutorial~N.
Even though it will not be paged back to, the ~C~I%~N is needed to activate any
previous ~HMarker~N.
#WP
%
#EF
#T
#C2,R6
It is best to mark 'pages' which are completely self-contained. If you have a
sequence of pages where a point is being built screen by screen, mark the
'page' at the start of the sequence with ~C~I%~N, but not the following screens.
Then when ~w~Z PAGEBACK ~N is used, it will jump back to the start of the build-up.
You do not have to mark every 'page'. You decide which 'page' the student will
jump to when the ~w~Z PAGEBACK ~N is selected.
And to activate the ~w~Z PAGEBACK ~N button, add ~C~IP~N to the ~C~I#W~H Command~N. But watch those
~HCommas~N!! ~G~I#WN,H,P~N or ~G~I#WP~N or ~G~I#WH,P~N etc.
#WP
#X